package com.dslcode.cloud.shop.api.feign.hystrix;

import com.dslcode.cloud.common.model.member.Member;
import com.dslcode.cloud.common.utils.AjaxResponse;
import com.dslcode.cloud.shop.api.feign.MemberProviderFeign;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by dongsilin on 2017/9/28.
 */
@Component
public class MemberProviderHystrix implements MemberProviderFeign {


    @Override
    public AjaxResponse<PageInfo<Member>> list(@RequestParam(name = "pageNum", defaultValue = "1") int pageNum, @RequestParam(name = "pageSize", defaultValue = "10") int pageSize) {
        return AjaxResponse.buildFailed();
    }

    @Override
    public AjaxResponse<Member> detail(@PathVariable(name = "id") Long id) {
        return AjaxResponse.buildFailed();
    }

    @Override
    public AjaxResponse addPoints(@PathVariable(name = "id") Long id, int points) {
        return AjaxResponse.buildFailed();
    }
}
